import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-09-25
 * Time:15:06
 */
public class Java_4 {
    //数组中相同数字大于数组一半长度.
    public static int MoreThanHalfNum_Solution (int[] numbers) {
        HashMap<Integer,Integer> map=new HashMap<Integer,Integer>();
        for(int i=0;i<numbers.length;i++)
        {
            if(map.containsKey(numbers[i]))
            {
                map.put(numbers[i],map.get(numbers[i])+1);
            }
            else map.put(numbers[i],1);
        }
        for(int num:map.keySet())
        {
            if(map.get(num)>numbers.length/2)
            {
                return num;
            }
        }
        return -1;
    }

    public static void main(String[] args) {
        MoreThanHalfNum_Solution(new int[]{1,2,3,2,2,2,5,4,2});

        //字符串中最长连续的数字
        Scanner in = new Scanner(System.in);
        String str1=in.nextLine();
        String str2="";
        for(int i=0;i<str1.length();i++)
        {
            String str3="";
            while(i<str1.length()&&str1.charAt(i)>=48&&str1.charAt(i)<=57)
            {
                str3+=str1.charAt(i);
                i++;
            }
            if(str2.length()<str3.length())
            {
                str2="";
                str2+=str3;
            }
        }
        System.out.println(str2);

    }
}
